import { v4 as uuidv4} from 'uuid'
export const getUUID = ()=>{
    let uuid_token = localStorage.getItem('UUIDTOKEN')
    if (!uuid_token) {
        //如果本地存储找不到uuid,则我们自动生成一个uuid
        uuid_token = uuidv4()
        //然后再进行存储在本地
        localStorage.setItem('UUIDTOKEN',uuid_token)
    }
    //一定要有返回值,要不然返回的就是undefined
    return uuid_token 
}